package com.example.homeworkmutualevaluation.Entity;

import com.example.homeworkmutualevaluation.utils.UniqueId;
import jakarta.persistence.*;
import lombok.Data;

import java.sql.Timestamp;

@Entity
@Table(name = "message")
@Data
public class Message {
    @Id
    private String id;
    private String tphone;
    private String sphone;
    private boolean read;
    private String title;
    private String content;
    private Timestamp datetime;

    public Message() {}

    public Message(String tphone, String sphone, String title, String content) {
        this.id = UniqueId.next();
        this.tphone = tphone;
        this.sphone = sphone;
        this.title = title;
        this.content = content;
    }
}
